@import '~antd/es/style/themes/default.less';

html,
body,
#root {
  height: 100%;
  /*滚动条整体样式*/
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  /*滚动条滑块*/
  ::-webkit-scrollbar-thumb {
    border-radius: 1em;
    background-color: rgba(50, 50, 50, 0.3);
  }

  /*滚动条轨道*/
  ::-webkit-scrollbar-track {
    border-radius: 1em;
    background-color: rgba(50, 50, 50, 0.1);
  }
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;

  .ant-table-tbody {
    .ant-btn-link {
      height: 0;
    }
  }
}

.ant-drawer-header {
  color: #fff;
  background: rgba(15, 60, 255, 1);
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

ul,
ol {
  list-style: none;
}

@media (max-width: @screen-xs) {
  .ant-table {
    width: 100%;
    overflow-x: auto;

    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;

        > span {
          display: block;
        }
      }
    }
  }
}

.ant-table-thead > tr > th {
  font-weight: bolder !important;
}

// :global {
// .container {
// .BaseTable__body {
//   .ant-col {
//     width: 100%;
//     .ant-tag {
//       float: right;
//       margin-right: 5%;
//     }
//   }
// }
// }
// }

// 预警样式
.success-type {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #fff;
  background-color: rgba(67, 207, 124, 1);
  text-align: center;
  line-height: 15px;
  margin: 0 auto;
}
.warning-type {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: #fff;
  background-color: rgba(255, 0, 25, 1);
  text-align: center;
  line-height: 15px;
  margin: 0 auto;
}

.BaseTable {
  position: relative;
  box-sizing: border-box;
  font-size: 13px;
  background-color: #fff;
  box-shadow: 0 2px 4px 0 #eee;
}
.ant-descriptions-item-label {
  width: 100px;
}

.BaseTable--disabled {
  opacity: 0.7;
  pointer-events: none;
}

.BaseTable__table {
  background-color: #fff;
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column-reverse;
}

.BaseTable__table-main {
  outline: 1px solid #eee;
  left: 0;
}

.BaseTable__table-main .BaseTable__header-cell:first-child,
.BaseTable__table-main .BaseTable__row-cell:first-child {
  padding-left: 15px;
}

.BaseTable__table-main .BaseTable__header-cell:last-child,
.BaseTable__table-main .BaseTable__row-cell:last-child {
  padding-right: 15px;
}

.BaseTable__table-main .BaseTable__header {
  background-color: #f8f8f8;
}

.BaseTable__table-frozen-left .BaseTable__header,
.BaseTable__table-frozen-left .BaseTable__body,
.BaseTable__table-frozen-right .BaseTable__header,
.BaseTable__table-frozen-right .BaseTable__body {
  overflow: hidden !important;
}

.BaseTable__table-frozen-left {
  box-shadow: 2px 0 4px 0 #eee;
  top: 0;
  left: 0;
}

.BaseTable__table-frozen-left .BaseTable__header-cell:first-child,
.BaseTable__table-frozen-left .BaseTable__row-cell:first-child {
  padding-left: 15px;
}

.BaseTable__table-frozen-left .BaseTable__header-row,
.BaseTable__table-frozen-left .BaseTable__row {
  padding-right: 0 !important;
}

.BaseTable__table-frozen-left .BaseTable__body {
  overflow-y: auto !important;
}

.BaseTable__table-frozen-right {
  box-shadow: -2px 0 4px 0 #eee;
  top: 0;
  right: 0;
}

.BaseTable__table-frozen-right .BaseTable__header-cell:last-child,
.BaseTable__table-frozen-right .BaseTable__row-cell:last-child {
  padding-right: 15px;
}

.BaseTable__table-frozen-right .BaseTable__header-row,
.BaseTable__table-frozen-right .BaseTable__row {
  padding-left: 0 !important;
}

.BaseTable__table-frozen-right .BaseTable__body {
  overflow-y: auto !important;
}

.BaseTable__header {
  overflow: hidden !important;
}

.BaseTable .BaseTable__header,
.BaseTable .BaseTable__body {
  outline: none;
}

.BaseTable__header-row,
.BaseTable__row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #eee;
  box-sizing: border-box;
}

.BaseTable__header-row {
  background-color: #f8f8f8;
  font-weight: 700;
}

.BaseTable__row {
  background-color: #fff;
}

.BaseTable__row:hover,
.BaseTable__row--hovered {
  background-color: #f3f3f3;
}

.BaseTable__row-expanded {
  border-bottom: 1px solid #eee;
}

.BaseTable__header-cell,
.BaseTable__row-cell {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7.5px;
  box-sizing: border-box;
}

.BaseTable__header-cell--align-center,
.BaseTable__row-cell--align-center {
  justify-content: center;
  text-align: center;
}

.BaseTable__header-cell--align-right,
.BaseTable__row-cell--align-right {
  justify-content: flex-end;
  text-align: right;
}

.BaseTable__header-cell-text,
.BaseTable__row-cell-text {
  overflow: hidden;
  // text-overflow: ellipsis;
  white-space: nowrap;
}

.BaseTable__header-cell {
  position: relative;
  cursor: default;
}

.BaseTable__header-cell:hover .BaseTable__column-resizer {
  visibility: visible;
  opacity: 0.5;
}

.BaseTable__header-cell:hover .BaseTable__column-resizer:hover {
  opacity: 1;
}

.BaseTable__header-cell .BaseTable__sort-indicator {
  display: none;
}

.BaseTable__header-cell--sortable:hover {
  background-color: #f3f3f3;
  cursor: pointer;
}

.BaseTable__header-cell--sortable:not(.BaseTable__header-cell--sorting):hover
  .BaseTable__sort-indicator {
  display: block;
  color: #888;
}

.BaseTable__header-cell--sorting .BaseTable__sort-indicator,
.BaseTable__header-cell--sorting:hover .BaseTable__sort-indicator {
  display: block;
}

.BaseTable__header-cell--resizing .BaseTable__column-resizer {
  visibility: visible;
  opacity: 1;
}

.BaseTable__header-cell--resizing .BaseTable__column-resizer::after {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  content: '';
  left: -9999px;
}

.BaseTable__header-cell-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.BaseTable__header-row--resizing .BaseTable__header-cell {
  background-color: transparent;
  cursor: col-resize;
}

.BaseTable__header-row--resizing
  .BaseTable__header-cell:not(.BaseTable__header-cell--sorting)
  .BaseTable__sort-indicator {
  display: none;
}

.BaseTable__header-row--resizing
  .BaseTable__header-cell:not(.BaseTable__header-cell--resizing)
  .BaseTable__column-resizer {
  visibility: hidden;
}

.BaseTable__column-resizer {
  width: 3px;
  visibility: hidden;
  background-color: #ccc;
}

.BaseTable__column-resizer:hover {
  visibility: visible;
  opacity: 1;
}

.BaseTable__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  background-color: #fff;
}

.BaseTable__resizing-line {
  cursor: col-resize;
  position: absolute;
  top: 0;
  background-color: #ccc;
  width: 3px;
  transform: translateX(-100%);
}

.BaseTable__empty-layer {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  background-color: #fff;
}

.BaseTable__overlay {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.BaseTable__overlay > * {
  pointer-events: auto;
}

.ant-list-grid .ant-col > .ant-list-item {
  margin-bottom: 10px !important;
}

.ant-table-small > .ant-table-content > .ant-table-body {
  margin: 0 !important;
}

// 顶部栏
.page-header {
  .ant-page-header {
    padding-top: 0px;
    .ant-page-header-heading {
      line-height: 42px;
      // 左侧
      .ant-page-header-heading-title {
        margin: 2px 50px 2px 0;
        line-height: 20px;
        .title {
          line-height: 40px;
        }
      }
      // 中部
      .ant-page-header-heading-tags {
        margin: 0;
        width: 40%;
        .ant-tabs-bar {
          border: none;
          .ant-tabs-tab {
            padding: 10px 0px 12px 0px;
          }
        }
        .ant-tabs-bar,
        .ant-tabs-nav-wrap {
          margin-bottom: 0;
        }
      }
    }
  }

  .page-header-card {
    height: calc(100vh - 105px);
    border: none;
    overflow: hidden;
    .ant-card-head {
      min-height: 42px;
    }
    .ant-card-body {
      height: 100%;
      .ant-tabs {
        margin-bottom: 10px;
        .ant-tabs-tab {
          padding: 5px 0px 10px 0px;
        }
        .ant-tabs-bar {
          margin-bottom: 0;
        }
        .ant-tabs-extra-content {
          line-height: 30px;
        }
      }
    }
  }
  // 编辑
  .page-header-card-edit {
    height: calc(100vh - 105px);
    border: none;
    overflow: hidden;
    .ant-card-head {
      min-height: 42px;
    }
    .ant-card-body {
      height: 100%;
      .ant-tabs-bar {
        margin-bottom: 10px;
      }
      .month12 {
        width: 100%;
        .ant-radio-button-wrapper {
          width: calc(100% / 12);
          text-align: center;
        }
        .ant-radio-button-wrapper-checked {
          background-color: #fff;
          color: #2761ff;
        }
      }
    }
  }
}

// 弹出的基本信息
.basic-info {
  font-size: 14px;
  color: rgba(255, 141, 26, 1);
  cursor: pointer;
}
.ant-popover-title {
  min-height: 28px !important;
  color: rgba(0, 0, 0, 0.85) !important;
  font-weight: bold !important;
  font-size: 14px !important;
}
.ant-popover-inner-content {
  padding: 5px 10px !important;
}

// 操作按钮的间距
.operation > * {
  margin-left: 5px;
}

// 文字颜色
.color-yellow {
  color: rgb(250, 173, 19);
}
.color-red {
  color: rgb(255, 0, 25);
}
.color-green {
  color: rgb(67, 207, 124);
}

// 文字对齐
.tcenter {
  text-align: center;
}
.tright {
  text-align: right;
}

// tab 下划线
.ant-tabs-ink-bar {
  background-color: transparent !important;
}
.ant-tabs-ink-bar::after,
ant-tabs-ink-bar-no-animated::after {
  content: '' !important;
  display: block !important;
  margin: 0 auto !important;
  height: 2px !important;
  width: 24px !important;
  background-color: #2761ff !important;
}

// 去掉card边框
.ant-card {
  border: none !important;
}

// 省略号
.ellipsis {
  width: '100%';
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.ant-drawer-body {
  overflow: auto;
}

.ant-drawer-content {
  background-color: rgba(245, 248, 250, 1) !important;
}

// 审批样式-pc
.approve-box {
  width: 100%;
  // 头部大标题
  .approve-box-title {
    margin-bottom: 20px;
    color: #4d4d4d;
    font-size: 22px;
    text-align: center;
  }
  //审批内容
  .approve-box-content {
    background-color: #fff;
    // 审批内容一级标题
    .approve-box-content-title {
      .ant-divider-horizontal {
        margin: 10px 0;
      }
      .approve-box-content-title-text {
        display: flex;
        align-items: center;
        width: 100%;
        color: #333;
        font-size: 16px;
        font-weight: 700;
      }
      .approve-box-content-title-text::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 20px;
        margin-right: 10px;
        background: #1b5bff;
      }
    }
    .approve-box-content-paragraph {
      margin-bottom: 10px;
      // 审批内容二级标题
      .approve-box-content-paragraph-title {
        color: #333;
        font-weight: 700;
        font-size: 14px;
        margin-bottom: 5px;
      }
      .approve-box-content-paragraph-sub-title {
        color: #333;
        font-weight: 700;
        font-size: 12px;
        margin-bottom: 5px;
      }
      // 附件查看
      .approve-box-content-paragraph-file {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .approve-box-content-paragraph-file-error {
          color: red;
        }
      }
      .approve-box-content-paragraph-file:hover {
        cursor: pointer;
        background-color: #e6f7ff;
      }
    }
    .approve-box-content-footer {
      display: flex;
      justify-content: center;
      .ant-btn {
        margin: 0 2.5px;
      }
    }
  }
}
